import request from './request'

/**
 * 发布公告
 */
export function publishAnnouncement(data) {
  return request({
    url: '/announcement/publish',
    method: 'post',
    data
  })
}

/**
 * 获取公告列表
 */
export function getAnnouncementList(params) {
  return request({
    url: '/announcement/list',
    method: 'get',
    params
  })
}

/**
 * 获取公告详情
 */
export function getAnnouncementDetail(id) {
  return request({
    url: `/announcement/${id}`,
    method: 'get'
  })
}

